-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infra: Migrate to gradle #783
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # api/src/main/java/io/kafbat/ui/service/ApplicationInfoService.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi germanosin! 👋
Welcome, and thank you for opening your first PR in the repo!
Please wait for triaging by our maintainers.
Please take a look at our contributing guide.
api/build.gradle
Outdated
|
||
dependencies { | ||
implementation project(":contract") | ||
implementation project(":frontend") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api shouldn't depend on the frontend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On prod build should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm not quite, in maven there's a skipUIBuild
flag to skip UI build even in prod profile. Let's address this functionality
api/build.gradle
Outdated
|
||
checkstyle { | ||
toolVersion '10.3.1' | ||
configFile = rootProject.file('etc/checkstyle/checkstyle-e2e.xml') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configFile = rootProject.file('etc/checkstyle/checkstyle-e2e.xml') | |
configFile = rootProject.file('etc/checkstyle/checkstyle.xml') |
due to e2e having a different rule set
contract/build.gradle
Outdated
|
||
plugins { | ||
id "java-library" | ||
id 'org.openapi.generator' version '7.9.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we extract this version as well to a version catalog (gradle's "dependency management" list) to make it possible for dependabot to track these versions as well?
e2e-tests/build.gradle
Outdated
|
||
checkstyle { | ||
toolVersion '10.3.1' | ||
configFile = rootProject.file('etc/checkstyle/checkstyle.xml') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configFile = rootProject.file('etc/checkstyle/checkstyle.xml') | |
configFile = rootProject.file('etc/checkstyle/checkstyle-e2e.xml') |
gradle.properties
Outdated
@@ -0,0 +1,7 @@ | |||
description='Kafka UI' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description='Kafka UI' | |
description='Kafbat UI' |
api/build.gradle
Outdated
plugins { | ||
id 'antlr' | ||
id 'checkstyle' | ||
id 'org.springframework.boot' version '3.4.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gradle/libs.versions.toml
has 3.3.6
@@ -0,0 +1,103 @@ | |||
[versions] | |||
spring-boot = '3.3.6' | |||
spring-ldap = '6.3.5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 6.3.2
? in maven we don't override this and the current version is 6.4.2
serde-api/build.gradle
Outdated
// repositories { | ||
// sonatype { | ||
// nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") | ||
// snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? 👀
@@ -0,0 +1,2 @@ | |||
sonatypeUsername=test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to commit these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need any value to be present during build time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can any value be ""? test
is a bit confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's a bit confusing
} | ||
|
||
checkstyle { | ||
toolVersion '10.3.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be added to the catalog?
kafkaVersion = "3.8.0" | ||
aspectjVersion = "1.9.21" | ||
allureVersion = "2.27.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this version does not seem correct. It should be from the confluent distribution
implementation "commons-io:commons-io:2.16.1" | ||
implementation "org.testng:testng:7.10.0" | ||
implementation "com.codeborne:selenide:7.2.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's please add this to the catalog as well
} | ||
|
||
checkstyle { | ||
toolVersion '10.3.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version should ideally be shared with the other module
|
||
implementation libs.aws.msk.auth | ||
implementation (libs.azure.identity) { | ||
exclude group: 'io.netty', module: 'netty-tcnative-boringssl-static' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's please explain why we are excluding this
Please update the dependabot configuration as well 🙏 See kafka-ui/.github/dependabot.yml Line 4 in ed49499
|
artifact(javadocJar) { | ||
classifier = 'javadoc' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Do we publish our JAR to central, or who consumes us as JAR directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serde-api
is quite the name
from { | ||
image = 'azul/zulu-openjdk-alpine:21.0.5-jre-headless' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be delegated to a Dockerfile or read from the existing Dockerfile?
The main downside of setting this here is that dependabot won't get any visibility and we will need to update it manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, in maven we have prod
and local
profiles, the latter aimed at skipping frontend build. Can we address this as well please?
|
||
jib { | ||
from { | ||
image = 'azul/zulu-openjdk-alpine:21.0.5-jre-headless' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a few major issues with using jib:
- Currently, in our Dockerfile we have a few additional packages installed:
gcompat
required for snappytzdata
as requested by someone in the past to be able to configure timezones properly in the container
- We're creating a
/etc/kafkaui/
dir for a dynamic config. I am unsure what will happen with the current implementation, dynamic config operations might fail. - We're running the app as a non-root user there, not sure what's the default behavior with jib?
- Currently dependabot can properly bump the base image version present in dockerfile, however, it won't be able to work with this version located here, in
api/build.gradle
.
Overall, I prefer dockerfile build with a mvn/gradle plugin rather than jib in favor of more granular customization possibilities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plus the lack of dependabot support mentioned above
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)